 v.industryCodeName = v.industryCodeName ? v.industryCodeName : "--";
            let time = v.issuingDate.split(" ");
            v.issuingDate = time[0];
            for (var i in v) {
              v[i] = v[i] ? v[i] : "--";
            }
          });
        },
        (err) => {}
      );
    },
    onEdit() {},
    onClickPublish() {},
    onClickDelete() {},
    onClickOffline() {},
    handleSizeChange(val) {
      this.pageSize = val;
      this.getList(1);
    },
    handleCurrentChange(val) {
      this.current = val;
      this.getList(val);
    },
    // 监听页面宽度变化，刷新表格
    handleResize() {
      if (this.infoList) this.$refs.visitChart.handleResize();
    },
    //场内交易
    insideTransaction() {
      this.$router.push("/trade/account/exchange");
    },
    update() {
      const data = {
        certificationCriteria: this.seletedStandard[0], //当前选择的标准
        transactionStatus: this.seletedStatus[0], //当前选择的状态
        issuingDateStart: this.selectDate,
        projectName: this.searchProjectKeyword,
        methodName: this.searchMethodKeyword,
        assetsStatus: this.seletedAssetsStatus[0],
        projectScopeCode: this.seletedIndustry[0],
        issuingDateEnd: this.selectEndDate,
        assetsStatus: this.seletedAssetsStatus[0],
      };
      loadCarbonCreditPageList(data)
        .then((res) => {
          this.list = res.data.records;
          this.total = Number(res.data.total);
          this.current = Number(res.data.current);
          this.pageCount = Math.ceil(parseInt(res.data.total) / this.pageSize);
          this.list.map((v) => {
            v.industryCodeName = v.industryCodeName ? v.industryCodeName : "--";
            if (v.issuingDate) {
              let time = v.issuingDate.split(" ");
              v.issuingDate = time[0];
            }
            for (var i in v) {
              v[i] = v[i] ? v[i] : "--";
            }
          });
        })
        .catch((errror) => {});
    },
    getList(page) {
      const data = {
        asc: true,
        current: page,
        size: this.pageSize,
        // "status": 0,
        // "type": 0
      };
      loadCarbonCreditPageList(data)
        .then((res) => {
          if (res.data.records) {
            this.list = res.data.records;
          }
          this.total = Number(res.data.total);
          // console.log(res.data.total);
          this.current = Number(res.data.current);
          this.pageCount = Math.ceil(parseInt(this.total) / this.pageSize);
          this.list.map((v) => {
            //遍历表格数据
            // v.industryCodeName = v.industryCodeName ? v.industryCodeName : "--";
            if (v.issuingDate) {
              let time = v.issuingDate.split(" ");
              v.issuingDate = time[0];
            }
            // v.projectName = v.projectName?v.projectName:"--"
            // v.certificationCriteriaName = v.certificationCriteriaName?v.certificationCriteriaName:"--"
            // v.transactionStatusName = v.transactionStatusName?v.transactionStatusName:"--"
            for (var i in v) {
              v[i] = v[i] ? v[i] : "--";
              if (v[i] == " ") {
                v[i] = "--";
              }
            }
          });
        })
        .catch((errror) => {});
    },

    // checkbox start
    signCheckChange() {
      let allCheckedFlag = true;
      let allReset = true;
      this.articals.forEach((item) => {
        if (item.checked == true) {
          allReset = false;
        } else {
          allCheckedFlag = false;
        }
      });
      if (allCheckedFlag || allReset) {
        this.indeterminateFlag = false;
        if (allCheckedFlag) {
          this.allchecked = true;
        } else {
          this.allchecked = false;
        }
      } else {
        this.indeterminateFlag = true;
      }
      this.reRender = !this.reRender;
    },

    //render-header方法
    renderCheckHeader(h, { column, $index }) {
      return h("span", {}, [
        h("el-checkbox", {
          props: {
            checked: this.allchecked,
            indeterminate: this.indeterminateFlag, //表头复选框状态
          },
          on: {
            change: this.updateAllSelected, // 选中事件
          },
        }),
      ]);
    },
    // 格式化验证标准字典
    formatCertification(data) {
      data.map((v) => {
        let CertificationItem = {
          label: "",
        };
        if (v.name == "全部") {
          CertificationItem.label = v.name;
        } else {
          CertificationItem.value = v.value;
          CertificationItem.label = v.name;
        }
        this.optionsStandard.push(CertificationItem);
      });
    },
    // 格式化行业类型字典
    formatIndustory(data) {
      data.map((v) => {
        let CertificationItem = {
          label: "",
        };
        if (v.name == "全部") {
          CertificationItem.label = v.name;
        } else {
          CertificationItem.value = v.value;
          CertificationItem.label = v.name;
        }
        this.optionsIndustory.push(CertificationItem);
      });
    },
    // 格式化状态类型字典
    formatStatus(data) {
      data.map((v) => {
        let CertificationItem = {
          label: "",
        };
        if (v.name == "全部") {
          CertificationItem.label = v.name;
        } else {
          CertificationItem.value = v.value;
          CertificationItem.label = v.name;
        }
        this.optionsOnlines.push(CertificationItem);
      });
    },
    // 格式化状态类型字典
    formatAssetStatus(data) {
      data.map((v) => {
        let CertificationItem = {
          label: "",
        };
        if (v.name == "全部") {
          CertificationItem.label = v.name;
        } else {
          CertificationItem.value = v.value;
          CertificationItem.label = v.name;
        }
        this.optionsAssetStatus.push(CertificationItem);
      });
    },

    
  },
  created() {
    // this.handleChangeVisitType();
  },

  mounted() {
    this.getList(1);
    this.exchangeList = getExchangeDict(this.$store);
    this.tradeMethods = getDiliveryMethodeDict(this.$store);
    let Certification = getCertificationCriteriaDict(this.$store);
    this.formatCertification(Certification);
    this.formatIndustory(getProjectAreaDict(this.$store));
    this.formatStatus(getAssetTradeStatusDict(this.$store));
    this.formatAssetStatus(getAssetStatusDict(this.$store));
  },
};
</script>
<style lang="scss" scoped>
.root {
  background: #f2f5f7;
}

.divBox {
  margin: 20px;
  background: #ffffff;
  box-shadow: 0px 2px 8px 0px #eaf0f3;
  border-radius: 8px;
}

.container {
  margin: 10px 0px 20px 0px;
  display: flex;
  flex-direction: row;
}

.content-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

>>> .el-cascader .el-input .el-input__inner,
>>> .el-cascader .el-input.is-focus .el-input__inner {
  border-color: transparent;
}

/deep/.el-date-picker.has-sidebar.has-time {
  background: #0a5857d6;
  color: #fff;
  border: 1px solid #22f4d6;
}

/deep/.el-date-picker__header-label {
  color: #ffffff;
}

.acea-row {
  /deep/.el-avatar--small {
    width: 22px;
    height: 22px;
    
  }
}

.checkTime {
  /deep/.el-radio__input {
    display: none;
  }
}

.ivu-pl-8 {
  margin-left: 8px;
  
}

.dashboard-console-visit {
  /deep/.el-card__header {
    padding: 14px 20px !important;
  }

  ul {
    li {
      list-style-type: none;
      margin-top: 12px;
    }
  }
}

.ivu-mb {
  margin-bottom: 10px;
}

.newsImg {
  width: 30px;
  height: 30px;
  border-radius: 4px;
}

.myassets-div {
  width: 184px;
  display: flex;
  flex-direction: row;
}

.icon {
  width: 24px;
  height: 24px;
}

.text-left {
  margin: auto;
  
  
  cursor: default;
  font-weight: 500;
  color: #24a776;
}

.myassets-container {
  display: flex;
  flex-direction: row;
  margin-top: 15px;
  margin-bottom: 20px;
  padding-left: 10px;
  padding-right: 10px;
  height: 54px;
  background: #e3f2ec;
  border-radius: 6px;
  // opacity: 0.1;
}

.assets-hint {
  margin-top: auto;
  margin-bottom: auto;
  
  
  font-weight: 400;
  color: #424c5c;
  
}

.assets-text {
  margin-top: auto;
  margin-bottom: auto;
  margin-left: 6px;
  
  
  font-weight: 500;
  color: #24a776;
  
}

.assets-line {
  margin: auto;
  margin-left: 10px;
  margin-right: 10px;
  width: 1px;
  height: 18px;
  border: 1px solid rgba(38, 181, 129, 0.5);
}

.center-vertical {
  margin-top: auto;
  margin-bottom: auto;
}

.require {
  color: red;
  
  position: relative;
  right: 20px;
}
</style>